package ccb.ygqd.inspur.common;

/**
 * 自定义的错误码
 */
public class ConstHF {

    public static final String CONN_TYPE_USB = "usb";
    public static final String CONN_TYPE_BLUE = "bluetooth";
    public static final String CONN_TYPE_WIRELESS_USB = "wirelessusb";

    //对于各类驱动均可能出现的错误，由本文档对其进行定义，命令规则为：DRV+7位数字
    //对于一类设备可能出现的错误，由本文档进行定义，命令规则为：DRV+3位设备类型代码+4位数字
    public static final String ERR_SUCCESS = "DRV0000000";

    public static final String ERR_INNER_ERROR = "DRV0000001"; //自定义错误（具体描述为内部错误码+详细错误信息）	厂商驱动及设备出现的内部错误

    public static final String ERR_NOT_CONN = "DRV0000003";
    public static final String ERR_DEV_ONT_CONN = "device not connected";
    public static final String ERR_TIME_OUT = "DRV0000002";
    public static final String ERR_OPEN_PORT = "DRV0000003";
    public static final String ERR_SEND_DATA = "DRV0000004";
    public static final String ERR_PARAM = "DRV0000005";  //参数错误
    public static final String ERR_NO_SO = "DRV0000006";
    public static final String ERR_LOAD_SO = "DRV0000007";

    public static final String ERR_IC_Card = "DRV0000009";  //读IC卡时，介质导致错误，返回该错误码
    public static final String ERR_ARQC = "DRV00000010";  //IC卡芯片计算ARQC发生错误时返回该错误

    public static final String ERR_ARPC = "DRV00000011";
    @Deprecated
    public static final String ERR_NO_IC_CARD = "DRV00000012";

    public static final String ERR_read_IC_data = "DRV00000013";
    public static final String ERR_USER_Cancel_PIN = "DRV00000014"; //用户取消
    public static final String ERR_PWD_NOT_SAME = "DRV00000015"; //两次输入不一致
    public static final String ERR_BUFF_NOT_ENOUGH = "DRV00000016"; //接口缓冲区大小参数不足

    public static final String ERR_WRITE_FILE = "DRV00000017"; //驱动写文件失败
    public static final String ERR_PRINT_STR = "DRV00000018"; //打印字符串格式错误

    public static final String ERR_INVALID_OPERA = "DRV00000019";// 无效操作

    public static final String ERR_USER_CANCEL = "DRV00000020"; //操作被取消

    public static final String ERR_HARDWARE = "DRV00000021"; //硬件故障

    public static final String ERR_NO_CONDITION = "DRV00000022"; //调用条件不满足。 比如当读取卡交易明细时，没有放置IC卡的情况


    public static final String ERR_INVALID_ARPC = "DRV00000099"; //执行IC卡脚本出错时IC卡返回的错误码（类似自定义错误码，错误描述由内部错误码和错误信息组成）

    public static final String ERR_BLUE_CONNECT = "DRV00000023"; //蓝牙连接失败

    public static final String ERR_BT_KEY_CHECK = "DRV00000024"; //蓝牙通讯密钥校验失败


    //身份证模块
    public static final String ERR_IDC_NO_PERMISSION = "DRVIDC0001"; //无权限操作设备（Android设备）
    public static final String ERR_IDC_NO_CARD =       "DRVIDC0002"; //设备调用后天线感应不到身份证时返回该错误
    public static final String ERR_IDC_READ_FAIL =     "DRVIDC0003"; //读证时因某种原因导致读取失败，例如芯片受损

    // 磁条卡
    public static final String ERR_MSR_READ_FAIL =     "DRVRDC0001"; //

    //PIN 密码键盘

    public static final String ERR_PIN_PWD_SIMPLE =     "DRVPIN0001"; //
    public static final String ERR_PIN_NO_KEY     =     "DRVPIN0002"; // 使用指定的秘钥加密数据时，秘钥不存在的情况

    public static final String ERR_PIN_NO_MAIN_KEY =     "DRVPIN0003"; // 下发工作密钥时，指定索引的主密钥不存在，则返回此错误码

    public static final String ERR_PIN_NO_WORK_KEY =     "DRVPIN0004"; //使用工作密钥（加密PIN、加解密数据等场景）时，指定索引的工作密钥不存在，则返回此错误码

    public static final String ERR_PIN_KEY_ERROR   =     "DRVPIN0005"; //密钥数据有问题，如长度不够，或者主密钥是SM4，工作密钥是des密钥等场景

    //YGB 电子签名
    public static final String ERR_SIGN_NOT_SIGN   =     "DRVYGB0001"; //客户未签名
    public static final String ERR_SIGN_DECRYPT    =     "DRVYGB0002"; //签名轨迹数据解密失败




    // 各设备状态定义
    public static final String STATE_ID_NORMAL = "IDC0000001";
    public static final String STATE_ID_BUSY = "IDC0000002";
    public static final String STATE_ID_OFFLINE = "IDC0000003";

    public static final String STATE_MSR_NORMAL = "RDC0000001";
    public static final String STATE_MSR_BUSY = "RDC0000002";
    public static final String STATE_MSR_OFFLINE = "RDC0000003";


    public static final String STATE_ICC_NORMAL = "IC10000001";
    public static final String STATE_ICC_BUSY = "IC10000002";
    public static final String STATE_ICC_OFFLINE = "IC10000003";

    public static final String STATE_PIC_NORMAL = "IC20000001";
    public static final String STATE_PIC_BUSY = "IC20000002";
    public static final String STATE_PIC_OFFLINE = "IC20000003";

    public static final String STATE_PIN_NORMAL = "PIN0000001";
    public static final String STATE_PIN_BUSY = "PIN0000002";
    public static final String STATE_PIN_OFFLINE = "PIN0000003";


    public static final String STATE_FIG_NORMAL = "FIG0000001";
    public static final String STATE_FIG_BUSY = "FIG0000002";
    public static final String STATE_FIG_OFFLINE = "FIG0000003";

    public static final String STATE_SIGN_NORMAL = "YGB0000001";
    public static final String STATE_SIGN_BUSY = "YGB0000002";
    public static final String STATE_SIGN_OFFLINE = "YGB0000003";

    public static final String STATE_PSAM_NORMAL = "SAM0000001";
    public static final String STATE_PSAM_BUSY = "SAM0000002";
    public static final String STATE_PSAM_OFFLINE = "SAM0000003";
    public static final String STATE_CARD_BOX_NORMAL = "CDB0000001";
    public static final String STATE_CARD_BOX_BUSY = "CDB0000002";
    public static final String STATE_CARD_BOX_OFFLINE = "CDB0000003";

    public static final String STATE_CFG_NORMAL = "CFG0000001";
    public static final String STATE_CFG_BUSY = "CFG0000002";
    public static final String STATE_CFG_OFFLINE = "CFG0000003";


}
